
// 1. grammar_match
// 2. handle #grammar_match
// 3. create tokenfetcher lambda or class
// | ( $prefix:( http | https | ftp ) $url:@urlChars.tstringvalue ) | ( $prefix:\\\\ $url:@urlChars.tstringvalue )
// start_tokens    =   { "http" : "http", "https" : "https", "ftp" : "ftp", "ftps" : "ftps", "www" : "www" }
// url ( www.yahoo.com ) , serverpath( \\server1\folder\jdoe1 ), filepath ( 'c:\file.txt' )
compiler_plugin "FS.Plugins.Ext.Url"
{
    desc            =   "Allows representation of an url starting with www";
    examples        =   [ "http://www.fluentscript.com", "www.mycompany.com/login?user=johndoe1" ];
    type            =   "lexer";
    precedence      =   1; 
	isEnabled		=   false;
	//grammar_match   =   "$prefix:@starttoken.value $sep:( . | : )";
    grammar_parse   =   "$prefix:@starttoken.value $sep:( . | : ) $url:@urlChars.tvaluestring";
    start_tokens    =   [ "www", "http", "https", "ftp", "ftps" ]
    parse           =   function(args)
                        {       
							var prefix = args["prefixValue"];
							var url = args["urlValue"];
							return sys.compiler.toUri( prefix + url , args["prefix"]);
                        }
}